<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>vtc: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">vtc
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">vtc Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This is the main header file of Xilinx MVI Video Timing Controller (VTC) device driver. The VTC device detects video signals, independently overrides any one of them, re-generates video signals with +/- delay and with polarity inversion, and generates up to 16 one cycle Frame Sync outputs.</p>
<p>The device has the following main features:</p><ul>
<li>Detect video signals:<ul>
<li>horizontal sync</li>
<li>horizontal blank</li>
<li>vertical sync</li>
<li>vertical blank</li>
<li>active video</li>
<li>field id</li>
</ul>
</li>
<li>Independently override any one signal.</li>
<li>Re-generate video signals with +/- delay and with polarity inversion.</li>
<li>Generate up to 16 one cycle Frame Sync outputs.</li>
</ul>
<p>For a full description of VTC features, please see the hardware specification.</p>
<p><b>Software Initialization &amp; Configuration</b></p>
<p>The application needs to do following steps in order for preparing the VTC to be ready to process video signal handling.</p>
<ul>
<li>Call XVtc_LookupConfig using a device ID to find the core configuration.</li>
<li>Call XVtc_CfgInitialize to initialize the device and the driver instance associated with it.</li>
<li>Call XVtc_SetGenerator to set up the video signals to generate, if desired.</li>
<li>Call XVtc_SetPolarity to set up the video signal polarity.</li>
<li>Call XVtc_SetSource for source selection</li>
<li>Call XVtc_SetGeneratorHoriOffset to set up the Generator VBlank/VSync horizontal offsets, if values other than the default are needed</li>
<li>Call XVtc_EnableSync, if generator needs to be synced to the detector</li>
<li>Call XVtc_Enable to enable/start the VTC device.</li>
</ul>
<p><b>Interrupts </b></p>
<p>The interrupt types supported are:</p><ul>
<li>Frame Sync Interrupts 0 - 15</li>
<li>Generator interrupt:<ul>
<li>Generator Active Video Interrupt</li>
<li>Generator VBLANK Interrupt</li>
</ul>
</li>
<li>Detector interrupt:<ul>
<li>Detector Active Video Interrupt</li>
<li>Detector VBLANK Interrupt</li>
</ul>
</li>
<li>Signal Lock interrupt:<ul>
<li>Active Chroma signal lock</li>
<li>Active Video Signal Lock</li>
<li>Field ID Signal Lock</li>
<li>Vertical Blank Signal Lock</li>
<li>Vertical Sync Signal Lock</li>
<li>Horizontal Blank Signal Lock</li>
<li>Horizontal Sync Signal Lock</li>
</ul>
</li>
</ul>
<p><b> Virtual Memory </b></p>
<p>This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.</p>
<p><b> Threads </b></p>
<p>This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.</p>
<p><b> Asserts </b></p>
<p>Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that users leave asserts on during development.</p>
<p><b> Building the driver </b></p>
<p>The Vtc driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.</p>
<p><b> Examples </b></p>
<p>An example is provided with this driver to demonstrate the driver usage.</p>
<p><b>Cache Coherency</b></p>
<p><b>Alignment</b></p>
<p><b>Limitations</b></p>
<p><b>BUS Interface</b></p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who    Date     Changes
----- ------ -------- -----------------------------------------------
1.00a xd     08/05/08 First release
1.01a xd     07/23/10 Added GIER Added more h/w generic info into
                      xparameters.h Feed callbacks with pending
                      interrupt info. Added Doxygen &amp; Version support
2.00a xd     05/13/11 1. Renamed to "Video Timing Controller"
                      2. Added Generator/Detector VBlank/VSync
                         Horizontal offset setup/fetch support
                      3. Renamed the IP to support to be axi_vtc
                      4. Supported sync between generator and detector
                         with addition of new XVtc_EnableSync and
                         XVtc_DisableSync functions
                      5. Renamed XVtc_SetSync to XVtc_SetFSync
                      6. Renamed XVtc_GetSync to XVtc_GetFSync
                      7. Removed unnecessary register write in
                         XVtc_Reset
                      8. Corrected driver name in .mdd file
                      9. Updated register bit definition (a few fields grow
                         from 12 to 13 bit wide)
2.00a cm     05/25/11 1. Renamed XVtc_SetSkip to XVtc_SetSkipLine
                      2. Renamed XVtc_GetSkip to XVtc_GetSkipLine
                      3. Added XVtc_SetSkipPixel
                      4. Added XVtc_GetSkipPixel
2.00a cm     06/16/12 1. Added missing xil_assert.h include
2.00a cm     07/25/12 1. Removed unused XVtc_IntrSetLockPolarity function
3.00a cm     08/02/12 1. Added the XVtc_Sync_Reset frame sync'ed SW
                      reset function.
3.00a cjm    08/02/12 Converted from xio.h to xil_io.h, translating
                      basic types, MB cache functions, exceptions and
                      assertions to xil_io format.
                      Replaced the following
                      "XExc_Init" -&gt; "Xil_ExceptionInit"
                      "XExc_RegisterHandler" -&gt; "Xil_ExceptionRegister
                                                                Handler"
                      "XEXC_ID_NON_CRITICAL_INT" -&gt; "XIL_EXCEPTION_ID_INT"
                      "XExceptionHandler" -&gt; "Xil_ExceptionHandler"
                      "XExc_mEnableExceptions" -&gt; "Xil_ExceptionEnable"
                      "XEXC_NON_CRITICAL" -&gt; "XIL_EXCEPTION_NON_CRITICAL"
                      "XExc_DisableExceptions" -&gt; "Xil_ExceptionDisable"
                      "XExc_RemoveHandler" -&gt; "Xil_ExceptionRemoveHandler"
                      "microblaze_enable_interrupts" -&gt; "Xil_ExceptionEnable"
                      "microblaze_disable_interrupts" -&gt; "Xil_Exception
                                                              Disable"</pre><pre>                      "XCOMPONENT_IS_STARTED" -&gt; "XIL_COMPONENT_IS_STARTED"
                      "XCOMPONENT_IS_READY" -&gt; "XIL_COMPONENT_IS_READY"</pre><pre>                      "XASSERT_NONVOID" -&gt; "Xil_AssertNonvoid"
                      "XASSERT_VOID_ALWAYS" -&gt; "Xil_AssertVoidAlways"
                      "XASSERT_VOID" -&gt; "Xil_AssertVoid"
                      "Xil_AssertVoid_ALWAYS" -&gt; "Xil_AssertVoidAlways"
                      "XAssertStatus" -&gt; "Xil_AssertStatus"
                      "XAssertSetCallback" -&gt; "Xil_AssertCallback"</pre><pre>                      "XASSERT_OCCURRED" -&gt; "XIL_ASSERT_OCCURRED"
                      "XASSERT_NONE" -&gt; "XIL_ASSERT_NONE"</pre><pre>                      "microblaze_disable_dcache" -&gt; "Xil_DCacheDisable"
                      "microblaze_enable_dcache" -&gt; "Xil_DCacheEnable"
                      "microblaze_enable_icache" -&gt; "Xil_ICacheEnable"
                      "microblaze_disable_icache" -&gt; "Xil_ICacheDisable"
                      "microblaze_init_dcache_range" -&gt; "Xil_DCacheInvalidate
                                                                      Range"</pre><pre>                      "XCache_DisableDCache" -&gt; "Xil_DCacheDisable"
                      "XCache_DisableICache" -&gt; "Xil_ICacheDisable"
                      "XCache_EnableDCache" -&gt; "Xil_DCacheEnableRegion"
                      "XCache_EnableICache" -&gt; "Xil_ICacheEnableRegion"
                      "XCache_InvalidateDCacheLine" -&gt; "Xil_DCacheInvalidate
                                                                      Range"</pre><pre>                      "XUtil_MemoryTest32" -&gt; "Xil_TestMem32"
                      "XUtil_MemoryTest16" -&gt; "Xil_TestMem16"
                      "XUtil_MemoryTest8" -&gt; "Xil_TestMem8"</pre><pre>                      "xutil.h" -&gt; "xil_testmem.h"</pre><pre>                      "xbasic_types.h" -&gt; "xil_types.h"
                      "xio.h" -&gt; "xil_io.h"</pre><pre>                      "XIo_In32" -&gt; "Xil_In32"
                      "XIo_Out32" -&gt; "Xil_Out32"</pre><pre>                      "XTRUE" -&gt; "TRUE"
                      "XFALSE" -&gt; "FALSE"
                      "XNULL" -&gt; "NULL"</pre><pre>                      "Xuint8" -&gt; "u8"
                      "Xuint16" -&gt; "u16"
                      "Xuint32" -&gt; "u32"
                      "Xint8" -&gt; "char"
                      "Xint16" -&gt; "short"
                      "Xint32" -&gt; "long"
                      "Xfloat32" -&gt; "float"
                      "Xfloat64" -&gt; "double"
                      "Xboolean" -&gt; "int"
                      "XTEST_FAILED" -&gt; "XST_FAILURE"
                      "XTEST_PASSED" -&gt; "XST_SUCCESS"
4.00a cjm    02/07/13 Removed Unused Functions
                      XVtc_IntrEnableGlobal
                      XVtc_IntrDisableGlobal
5.00a cjm    08/07/13 Replaced XVTC_RESET with (XVTC_CTL)
                      Replaced XVTC_RESET_RESET_MASK with
                      (XVTC_CTL_RESET_MASK)
                      Replaced XVTC_SYNC_RESET_MASK with (XVTC_CTL_SRST_MASK)
5.00a cjm    10/30/13 Replaced XVtc_RegUpdate with XVtc_RegUpdateEnable
                      Added XVtc_RegUpdateDisable
                      Removed type parameter from XVtc_Enable
                      Added XVtc_EnableGenerator to enable only the Generator
                      Added XVtc_EnableDetector to enable only the Detector
5.00a cjm    11/01/13 Added Timing, VideoMode and Signal Conversion
                      Functions:
                      XVtc_ConvVideoMode2Timing
                      XVtc_ConvTiming2Signal
                      XVtc_ConvSignal2Timing
                      XVtc_ConvTiming2VideoMode
                      Added Timing and Video Mode Set/Get Functions:
                      XVtc_SetGeneratorTiming
                      XVtc_SetGeneratorVideoMode
                      XVtc_GetGeneratorTiming
                      XVtc_GetGeneratorVideoMode
                      XVtc_GetDetectorTiming
                      XVtc_GetDetectorVideoMode
6.0   adk    19/12/13 Updated as per the New Tcl API's.
6.1   adk    23/08/14 Implemented XVtc_SelfTest in
                      <a class="el" href="xvtc__selftest_8c.html">xvtc_selftest.c</a>.
                      Modified prototype of XVtc_GetVersion API.
7.0   vns    02/25/15 Added Interlaced field to <a class="el" href="struct_x_vtc___signal.html" title="This typedef contains the VTC signal configuration used by the Generator/Detector modules in a VTC de...">XVtc_Signal</a> structure,
                      Removed XVtc_RegUpdate as there are is one more API,
                      XVtc_RegUpdateEnable with same functionality but
                      provided backward compatability.</pre><pre>                      Modifications from <a class="el" href="xvtc_8c.html">xvtc.c</a> file are:
                      Modified HActiveVideo value to 1920 for
                      XVTC_VMODE_1080I mode.
                      Removed Major, Minor and Revision parameters from
                      XVtc_GetVersion.
                      Modified return type of XVtc_GetVersion from
                      void to u32.
                      Added progressive and interlaced mode switching feature.
                      Modified XVtc_SetGenerator, XVtc_GetGenerator,
                      XVtc_GetDetector, XVtc_ConvTiming2Signal and
                      XVtc_ConvSignal2Timing APIs</pre><pre>                      Modifications from <a class="el" href="xvtc__hw_8h.html">xvtc_hw.h</a> file are:
                      Removed XVTC_ERR_FIL_MASK macro because it is  not
                      present in latest product guide.
                      Modified register offsets from XVTC_* to XVTC_*_OFFSET
                      for consistency.
                      Added backward compatibility macros.</pre><pre>                      Modifications from <a class="el" href="xvtc__intr_8c.html">xvtc_intr.c</a> and <a class="el" href="xvtc__sinit_8c.html">xvtc_sinit.c</a> files
                      are:
                      updated doxygen tags.</pre><pre>                      Modifications from <a class="el" href="xvtc__selftest_8c.html">xvtc_selftest.c</a> file are:
                      First Release.
                      Implemented following function:
                      XVtc_SelfTest.
7.1   vns    10/14/15 Added InterlacedMode feild to <a class="el" href="struct_x_vtc___source_select.html" title="This typedef contains Source Selection configuration information for a VTC core. ">XVtc_SourceSelect</a>
                      structure
</pre> </div></div><!-- contents -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
